#include <retro.h>
#include "player.h"
#include "player.eventqueue.h"

using namespace Retro::Player::Graphic;

EventQueue::EventQueue()
{
  mBuffer.setSize(100);
}

VOID EventQueue::init(Display::DisplayDevice* iDevice)
{
}

VOID EventQueue::uninit(Display::DisplayDevice* iDevice)
{
}

UINT EventQueue::add(Player::Graphic::Event& iEvent)
{
  return 1;

  /*UINT i = 0;

  for (i; i < mBuffer.getLength(); ++i)
  {
    if (mBuffer[i].type == NULL)
    {
      mBuffer[i].graphic = iValue;
      mBuffer[i].type = iType;
      break;
    }
  }

  if (i == mBuffer.getLength())
  {
    StoredGraphic wItem;

    wItem.graphic = iValue;
    wItem.type = iType;
    i = mBuffer.add(wItem);
  }

  mBuffer[i].graphic->init(mDevice);

  return i;*/
}

VOID EventQueue::remove(UINT iIndex)
{
  /*if (iIndex < 0 || iIndex >= mBuffer.getLength())
    return;

  if (mBuffer[iIndex].type != GraphicNone)
  {
    mBuffer[iIndex].graphic->uninit(mDevice);
    delete mBuffer[iIndex].graphic;
    mBuffer[iIndex].type = GraphicNone;
  }*/
}
